<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

if (function_exists('register_sidebar')) {
    register_sidebar(array(
        'name' => 'Left Sidebar',
        'before_title' => '<h5>',
        'after_title' => '</h5>',
        'before_widget' => "<div class='boxes'>",
        'after_widget' => "</div>",
    ));
}

    function breadcrumbs() {

      $delimiter = '<span>&raquo;</span>';
      $name = 'Home'; //text for the 'Home' link
      $currentBefore = '<span class="current">';
      $currentAfter = '</span>';

      if ( !is_home() || !is_front_page() || is_paged() ) {

        echo '<div id="crumbs">';

        global $post;
        $home = get_bloginfo('url');
        echo '<a href="' . $home . '">' . $name . '</a> ' . $delimiter . ' ';

        if ( is_category() ) {
          global $wp_query;
          $cat_obj = $wp_query->get_queried_object();
          $thisCat = $cat_obj->term_id;
          $thisCat = get_category($thisCat);
          $parentCat = get_category($thisCat->parent);
          if ($thisCat->parent != 0) echo(get_category_parents($parentCat, TRUE, ' ' . $delimiter . ' '));
          single_cat_title();


        }

        echo '</div>';

      }
    }
    
    function register_my_menus() {
        register_nav_menus(
          array(
            'header-menu' => __( 'Header Menu' ),
            'footer-menu' => __( 'footer Menu' )
          )
        );
      }
      add_action( 'init', 'register_my_menus' );

?>